<template>
  <div class="app-container">
    <div class="btnCss">
      <el-tabs v-model="active" @tab-click="handleClick">
        <el-tab-pane label="待办任务" name="first">
          <equ-todo v-if="active == 'first'"></equ-todo>
        </el-tab-pane>
        <el-tab-pane label="已办任务" name="second">
          <equ-finished v-if="active == 'second'"></equ-finished>
        </el-tab-pane>
        <el-tab-pane  v-if="checkPermi(['workflow:equipment:manage'])"  label="设备准入准出" name="third">
          <equ-gather v-if="active == 'third'"></equ-gather>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import EquTodo from './components/Equtodo.vue';
import EquFinished from './components/Equfinished.vue';
import EquGather from './components/Equgather.vue';

export default {
    name:'Equipment',
    components: {
      EquFinished,
      EquGather,
      EquTodo
    },
  data() {
    return {
       active:'first'
    };
    },
    mounted() {
        // 获取按钮元素数组中第一个.click()
  },
  methods: {
    
    handleClick(tab, event) {
      this.active = tab.name
    }
  }
};
</script>
